Dynomotion

Group: DynoMotion Message: 8054 From: Toby Rule Date: 8/1/2013
Subject: generating pulse train in DSP
Hi Tom,

Is it possible, using the KFLOP, to generate a pulse train with the following characteristics:

Frequency range: 50-300 Hz
Pulse width range: 50-300 microseconds

I will need to control frequency and direction from within a DSP control loop.

I have achieved some degree of success using a C-program, but I need two threads to do it, because of the 90 microsecond time slices. Using this method, the pulse width isn't as accurate as I would like.

Is there an alternative way to do this? Maybe I could use one of the motion axes, but I'm not sure if I could vary the pulse width.

Thanks,

Toby
The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender immediately
and destroy the material in its entirety, whether electronic or hard copy. You are
notified that any review, retransmission, copying, disclosure, dissemination or other
use of, or taking of any action in reliance upon this information by persons or entities
other than the intended recipient is prohibited.
Group: DynoMotion Message: 8055 From: Tom Kerekes Date: 8/1/2013
Subject: Re: generating pulse train in DSP
Hi Toby,

I can't think of a simple way to do this.  But I don't fully understand what you are asking for.  Do you need all of those frequencies and pulse times?  Or just one or some of them?  With what resolution or granularity?

I assume you are aware of the 8-bit PWMs.  But they don't go to that low of a frequency:

16.67MZ /256 /256 = 254Hz min

The Step/Dir Generators can give the frequencies you desire, but at fixed pulse times of 3.78us max.  With a bit of external hardware like a Set/Reset Flip Flop you could probably do it using two Step/Dir Generators set to the same frequency but with one delayed.

There is a User Callback capability which allows a User Program to do something every 90 us.  This is better than normal user programs which basically execute every 180us.  But still wouldn't meet your requirements.

Regards
TK